import { menuStore } from '@/store/system/menu';
import {router} from '@/router/index';

// 动态路由添加
export const addRoute = async () => {
    await menuStore().getMenuList();
    const dynamicRoute = menuStore().getDynamicRoute;
    return dynamicRoute;
};

// 动态获取component
export const getViews = (path) => {
    let modules = import.meta.glob('../**/*.vue');
    return modules[path];
}

